package org.mybatis.generator.my.bean;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;
import java.util.Optional;

@Data
public class Clazz {

    private String className;

    private Optional<String> classComment;

    private String supportName;

    private List<ClazzField> fieldList;

    public Clazz() {
        this.fieldList = new ArrayList<>();
    }

    public String getClassComment() {
        return classComment.orElse(this.getClassName());
    }

}
